package com.train.mgr.modules.biz.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.train.mgr.modules.biz.dto.TraineeStuExerciseDTO;
import com.train.mgr.modules.biz.dto.TraineeStudyExerciseSearchVo;
import com.train.mgr.modules.biz.dto.request.TraineeExercisePageDTO;
import com.train.mgr.modules.biz.dto.request.UserExerciseReqDTO;
import com.train.mgr.modules.biz.dto.response.TraineeAllExerciseDTO;
import com.train.mgr.modules.biz.dto.response.TraineeStuRespDTO;
import com.train.mgr.modules.biz.dto.response.UserExerciseRespListDTO;
import com.train.mgr.modules.biz.dto.response.TraineeExerciseDTO;
import com.train.mgr.modules.biz.entity.LessonUserExercise;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户课时练习表 Mapper 接口
 * </p>
 *
 * @author cxg
 * @date 2025-09-30
 */
public interface LessonUserExerciseMapper extends BaseMapper<LessonUserExercise> {

    List<TraineeExerciseDTO> getCourseHomeExercise(@Param("courseId") Long courseId,@Param("lessonId") Long lessonId,
                                                   @Param("exerciseType") Integer exerciseType,@Param("userId") Long userId,
                                                   @Param("orderBy") String orderBy);

    Page<UserExerciseRespListDTO> selectUserExerciseList(Page<UserExerciseRespListDTO> page, @Param("param") UserExerciseReqDTO param);

    Page<TraineeAllExerciseDTO> getMyExerciseList(Page<TraineeAllExerciseDTO> page,@Param("param") TraineeExercisePageDTO dto);

    List<TraineeExerciseDTO> getReport(@Param("exerciseId")Long exerciseId,@Param("userId") Long userId);

    List<TraineeStudyExerciseSearchVo> getExerciseSearch(@Param("userId") Long userId);

    List<TraineeStuExerciseDTO> getExerciseStuCountList(@Param("userId") Long userId);

    TraineeStuRespDTO getExerciseStuCount(@Param("userId") Long userId);
}
